/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//		File Name		:		CParticle.h
//
//		Author			:		Kevin Jordan
//
//		Purpose			:		A header for all functions and members of the Particle class
//
//		Dates			:		Written( Feb 24, 2011 ) by Kevin Jordan		LastUpdate( Feb 24, 2011  ) by Kevin Jordan 
//	
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#include"CParticle.h"
#include "SGD Wrappers/CSGD_TextureManager.h"


float CoLerp(float fStart, float fEnd, float fPercent)
{
	return fEnd - ((fEnd - fStart) * fPercent);
}

CParticle::CParticle()
{
	m_fPosX = 0;
	m_fPosY = 0;
	m_fVelX = 0;
	m_fVelY = 0;
	m_fAcelX = 0;
	m_fAcelY = 0;

	StartColor = D3DCOLOR_XRGB(255,255,255);
	EndColor = D3DCOLOR_XRGB(255,255,255);

	m_fStartScale = 1.0f;
	m_fEndScale = 1.0f;
	m_fRotation = 0.0f;

	ImageID = -1;
	m_nLife = 15;

	m_dwcurColor = D3DCOLOR_XRGB(255,255,255);
	m_fCurScale = 1.0f;
	m_nCurrentLife = 15;
}

CParticle::CParticle( float PosX, float PosY, float VelX, float VelY, float AcelX, float AcelY,
					 DWORD StartColor, DWORD EndColor, float StartScale, float EndScale, float Rotation, 
					 int ImageID, int Life )
{
	SetPosX(PosX);
	SetPosY(PosY);
	SetVelX(VelX);
	SetVelY(VelY);
	SetAcelX(AcelX);
	SetAcelY(AcelY);
	
	SetStartColor(StartColor);
	SetCurColor(StartColor);
	SetEndColor(EndColor);

	SetStartScale(StartScale);
	SetCurScale(StartScale);
	SetEndScale(EndScale);

	SetRotation(Rotation);
	SetImageID(ImageID);
	SetLife((float)Life);
	m_nCurrentLife = Life;
}

CParticle::~CParticle()
{
}

void CParticle::Render()
{

}

void CParticle::Update( float fElapsedTime )
{

}